<h2 class="title">{%if $act eq 'add'%}添加{%else%}修改{%/if%}验收设备</h2>
<script>
$(document).ready(function() {
	$("#mc_log_id").change(function(){
		var mc_log_id;
		mc_log_id = $("#mc_log_id").val();
		if(mc_log_id>0){
			$.ajax({
	        url: '/ajax/ajax_mc_info.php',
	        type: 'GET',
	        async: false,
	        data:{mc_log_id:mc_log_id},
	        dataType: 'json',
	       // error: function(){alert('substring loading fail.');},
	        success: function(datas){
				//alert(datas);
				$("#mc_en_name").val(datas.mc_en_name);
				$("#plan_reply_no").val(datas.plan_reply_no);
				$("#mc_model").val(datas.mc_model);
	        }
		});
	
		}else{
			$("#mc_en_name").val('');
			$("#plan_reply_no").val('');
			$("#mc_model").val('');
		}
		
	}
	)
	
	
	
}
)

</script>
<form action="index.php?c=zy_auth_mc_log&m={%$act%}&post=1" method=post name=frm enctype="multipart/form-data" onSubmit="return Validator.Validate(this,3)">
<table class="tb_term" width="100%">
<tr>
	<td class="tr_td_width01 alignright">中文名称</td>
	<td>
		<select name="mc_log_id" id="mc_log_id"  class="select_edit02 txt-normal" dataType="Require"  msg="" {% if $act eq 'edit' %}readonly{%/if%}>
			<option value="">-- 请选择 --</option>
			{%foreach from=$data_list item=list%}
			<option value="{%$list.mc_log_id%}">{%$list.mc_cn_name%}</option>
			{%/foreach%}
		</select>
	</td>
	<td class="tr_td_width02 alignright">英文名称</td>
	<td class="tr_td_width03"><input type=text id="mc_en_name" class="input_edit_stand txt-normal" name="mc_en_name" size="22" value='{%$mc_en_name%}' readonly></td>
</tr>
<tr>	
	<td class="alignright">计划批复编号</td>
	<td><input type=text id="plan_reply_no" class="input_edit_stand txt-normal" name="plan_reply_no"  value='' readonly></td>
	<td class="alignright">规格型号</td>
	<td><input type=text id="mc_model" class="input_edit_stand txt-normal" name="mc_model" value='' readonly ></td>
</tr>
<tr>	
	<td class="alignright">出厂编号</td>
	<td><input type=text class="input_edit_stand txt-normal" name="comp_no" value='{%$comp_no%}' dataType="Require" msg=""> </td>	
	<td class="alignright">设备自编号</td>
	<td><input type=text class="input_edit_stand txt-normal" name="mc_self_no"  value='{%$mc_self_no%}'  dataType="Require" msg=""> </td>	
</tr>
<tr>
	<td class="alignright">设备去向</td>
	<td >
		<select name="mc_to_project"  class="select_edit02 txt-normal" dataType="Require"  msg="" {% if $act eq 'edit' %}readonly{%/if%}>
			<option value="">-- 请选择 --</option>
			{%foreach from=$project_arr item=list%}
			<option value="{%$list%}">{%$list%}</option>
			{%/foreach%}
		</select>
	</td>
	<td  class="alignright">分配人员</td>
	<td>
		<select name="put_user_id"  class="select_edit txt-normal">
		{%html_options options=$admin_info selected=$admin_user_id%}
		</select>
	</td>
</tr>
<tr>	
	<td class="alignright">验收结果</td>
	<td colspan="3">
		<select name="auth_result"  class="select_edit txt-normal">
			{%html_options options=$auth_result_info selected=$auth_result%}
		</select>
	</td>
</td>
<tr>
	<td class="alignright">主要验收内容</td>
	<td colspan="5"><textarea  class="textarea_edit txt-normal"  cols="100" rows="3" id="auth_content" name="auth_content" dataType="Require" msg="">{%$auth_content%}</textarea></td>
</tr>
<!--
<tr>
	<td class="alignright">验收报告备注</td>
	<td colspan="5"><textarea  class="textarea_edit"  rows="5" id="auth_mc_log_info" name="auth_mc_log_info" dataType="Require" msg="" >{%$auth_mc_log_info%}</textarea></td>
</tr>
-->
<tr>
	<td class="alignright">设备验收备注</td>
	<td colspan="5"><textarea class="textarea_edit txt-normal" rows="3" id="auth_info" name="auth_info" dataType="Require" msg="">{%$auth_info%}</textarea></td>
</tr>
</table>
<p class="btn_right">
	{%if $act eq edit%}<input type="hidden" name="mc_log_id" value='{%$mc_log_id%}'>{%/if%}
	<input type=hidden name='auth_no' id='auth_no' value='1'><!--验收数量1-->
	<input type=hidden name='contract_no' id='contract_no' value='{%$contract_no%}'>
	<input type=hidden name='mc_auth_id' id='mc_auth_id' value='{%$mc_auth_id%}'>
	<input type=hidden name='auth_mc_log_id' id='auth_mc_log_id' value='{%$auth_mc_log_id%}'>
	<button type="submit" class="b-default"><span><em>{%if $act eq 'add'%}提交{%else%}更新{%/if%}</em></span></button>
	<button type="button" class="b-default" hidefocus="true" onclick="javascript:history.go(-1)"><span><em>返回</em></span></button>
</p>
</form>